package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusinessTeacherStudentRelMapper;
import com.ruoyi.business.domain.BusinessTeacherStudentRel;
import com.ruoyi.business.service.IBusinessTeacherStudentRelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 教师关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-11-30
 */
@Service
public class BusinessTeacherStudentRelServiceImpl implements IBusinessTeacherStudentRelService 
{
    @Autowired
    private BusinessTeacherStudentRelMapper businessTeacherStudentRelMapper;

    /**
     * 查询教师关系
     * 
     * @param relId 教师关系主键
     * @return 教师关系
     */
    @Override
    public BusinessTeacherStudentRel selectBusinessTeacherStudentRelByRelId(Long relId)
    {
        return businessTeacherStudentRelMapper.selectBusinessTeacherStudentRelByRelId(relId);
    }

    /**
     * 查询教师关系列表
     * 
     * @param businessTeacherStudentRel 教师关系
     * @return 教师关系
     */
    @Override
    public List<BusinessTeacherStudentRel> selectBusinessTeacherStudentRelList(BusinessTeacherStudentRel businessTeacherStudentRel)
    {
        return businessTeacherStudentRelMapper.selectBusinessTeacherStudentRelList(businessTeacherStudentRel);
    }

    /**
     * 新增教师关系
     * 
     * @param businessTeacherStudentRel 教师关系
     * @return 结果
     */
    @Override
    public int insertBusinessTeacherStudentRel(BusinessTeacherStudentRel businessTeacherStudentRel)
    {
        return businessTeacherStudentRelMapper.insertBusinessTeacherStudentRel(businessTeacherStudentRel);
    }

    /**
     * 修改教师关系
     * 
     * @param businessTeacherStudentRel 教师关系
     * @return 结果
     */
    @Override
    public int updateBusinessTeacherStudentRel(BusinessTeacherStudentRel businessTeacherStudentRel)
    {
        return businessTeacherStudentRelMapper.updateBusinessTeacherStudentRel(businessTeacherStudentRel);
    }

    /**
     * 批量删除教师关系
     * 
     * @param relIds 需要删除的教师关系主键
     * @return 结果
     */
    @Override
    public int deleteBusinessTeacherStudentRelByRelIds(String relIds)
    {
        return businessTeacherStudentRelMapper.deleteBusinessTeacherStudentRelByRelIds(Convert.toStrArray(relIds));
    }

    /**
     * 删除教师关系信息
     * 
     * @param relId 教师关系主键
     * @return 结果
     */
    @Override
    public int deleteBusinessTeacherStudentRelByRelId(Long relId)
    {
        return businessTeacherStudentRelMapper.deleteBusinessTeacherStudentRelByRelId(relId);
    }
}
